package br.com.knowledge.persistence.hibernate.entities;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * AbdTriggerinferenciaId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class AbdTriggerinferenciaId implements java.io.Serializable {

	// Fields
	private Integer bcdColunasId;
	private Integer idtrigger;
	private String tipoacao;

	// Constructors

	/** default constructor */
	public AbdTriggerinferenciaId() {
	}

	/** full constructor */
	public AbdTriggerinferenciaId(Integer bcdColunasId, Integer idtrigger,
			String tipoacao) {
		this.bcdColunasId = bcdColunasId;
		this.idtrigger = idtrigger;
		this.tipoacao = tipoacao;
	}

	// Property accessors

	@Column(name = "bcd_colunas_id", nullable = false)
	public Integer getBcdColunasId() {
		return this.bcdColunasId;
	}

	public void setBcdColunasId(Integer bcdColunasId) {
		this.bcdColunasId = bcdColunasId;
	}

	@Column(name = "idtrigger", nullable = false)
	public Integer getIdtrigger() {
		return this.idtrigger;
	}

	public void setIdtrigger(Integer idtrigger) {
		this.idtrigger = idtrigger;
	}

	@Column(name = "tipoacao", nullable = false, length = 1)
	public String getTipoacao() {
		return this.tipoacao;
	}

	public void setTipoacao(String tipoacao) {
		this.tipoacao = tipoacao;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AbdTriggerinferenciaId))
			return false;
		AbdTriggerinferenciaId castOther = (AbdTriggerinferenciaId) other;

		return ((this.getBcdColunasId() == castOther.getBcdColunasId()) || (this
				.getBcdColunasId() != null
				&& castOther.getBcdColunasId() != null && this
				.getBcdColunasId().equals(castOther.getBcdColunasId())))
				&& ((this.getIdtrigger() == castOther.getIdtrigger()) || (this
						.getIdtrigger() != null
						&& castOther.getIdtrigger() != null && this
						.getIdtrigger().equals(castOther.getIdtrigger())))
				&& ((this.getTipoacao() == castOther.getTipoacao()) || (this
						.getTipoacao() != null
						&& castOther.getTipoacao() != null && this
						.getTipoacao().equals(castOther.getTipoacao())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getBcdColunasId() == null ? 0 : this.getBcdColunasId()
						.hashCode());
		result = 37 * result
				+ (getIdtrigger() == null ? 0 : this.getIdtrigger().hashCode());
		result = 37 * result
				+ (getTipoacao() == null ? 0 : this.getTipoacao().hashCode());
		return result;
	}

}